﻿@using Ed.Entity
@using Ed.Web.Helpers
@model  List<Dictionary<string, object>>
@{
    Layout = null;
    int roleid = ViewBag.RoleId;
    var username = ViewBag.username;
    var password = @Session[EdKeys.SESSION_USER_PASSWORD];
}
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>雪绒花 - 首页</title>
    <script src="http://siteapp.baidu.com/static/webappservice/uaredirect.js" type="text/javascript"></script>
    <script type="text/javascript">        uaredirect("/Account/Login/MobileIndex");</script>
    <link href="~/Themes/default/home/css/index.css" rel="stylesheet" type="text/css">
    <script src="~/Themes/default/home/js/jquery.js"></script>
    <script src="~/Themes/default/lib/jquery/jquery-1.11.1.min.js" type="text/javascript"></script>
</head>
<body>
 @*   <script type="text/javascript">
    <!--
        //平台、设备和操作系统      
            var system = {
                win: false,
                mac: false,
                xll: false
            };
            //检测平台
            var p = navigator.platform;
            alert(p);
            system.win = p.indexOf("Win") == 0;
            system.mac = p.indexOf("Mac") == 0;
            system.x11 = (p == "X11") || (p.indexOf("Linux") == 0);
            //跳转语句
            function ss() {
                if (system.win || system.mac || system.xll) {//转向后台登陆页面
                    window.location.href = "/Account/Login";
                    alert(1);
                } else {
                    window.location.href = "/Account/Login/MobileIndex";
                }
            }
    -->
    </script>*@
    <script type="text/javascript">

        $(function () {

//            if (location.reload()) {
//                window.clearInterval(ss());
//                window.location.reload();
//            }
//            location.reload();
            var m;
            $(".main li").hover(function () {
                m = $(this).index();
                $(".main li img").eq(m).animate({ width: "110px", marginTop: "0px" }, 200).animate({ width: "100px", marginTop: "5px" }, 200);
            }, function () {
                m = $(this).index();
                $(".main li img").eq(m).animate({ width: "90px", marginTop: "10px" }, 0);
            });

            var len = $(".main ul li").length;
            //alert(len);
            var wid = 182 * len;
            $(".main ul").css("width", wid + "px");
        });
    </script>
    <script type="text/javascript">      
        window.onload = function func1() {
            if (@roleid == "6")//判断用户id
            {
               location.href = "/Home/Main/Order/";       
            }
            if(@roleid=="5")
            {
            location.href = "/Home/Main/Order/"; 
            }
            if(@roleid=="4"){
            location.href = "/Home/Main/Yuangong/"; 
            }
        }        
    </script>
    <!--固定顶部部分 开始-->
    <div class="header clearfix">
        <a href="javascript:void(0);" class="current-nav" style="display: block;"><em class="menu-more-ico">
        </em><span id="g_mod_name">首页</span> </a>
        <div class="vh-avator-area">
            <div class="gl-lang-container">
                <div class="account-avator">
                    <div class="account-avator-bg">
                    </div>
                </div>
                <span class="account-name" id="g_username2">@Session[EdKeys.SESSION_USER_NAME]（<b>@Session[EdKeys.SESSION_ROLE_NAME]</b>）
                    <a href="/Account/Login/Logout/">安全退出</a></span>
            </div>
        </div>
    </div>
    <!--固定顶部部分 结束-->
    <!--主页主题部分 开始-->
    <img src='http://qr.liantu.com/api.php?bg=f3f3f3&fg=ff0000&gc=222222&el=l&w=100&m=10&text=http://www.xrhyun.com/Account/Login/MobileIndex?username=@username&userpass=@password'/>
    <div class="main">
        <div class="main-container">
            <ul>
                @if ((@Session[EdKeys.SESSION_ROLE_NAME]).ToString() == "超级管理员" || (@Session[EdKeys.SESSION_ROLE_NAME]).ToString() == "客服管理员")
                {
@*  if (Html.LoadModulePowers(@Model, "Customer"))
                    {
                    <li><a href="/Home/Main/Customer/"> <img src="~/Themes/default/home/images/home_btn_03.png"><span>客户管理</span></a></li>
                    }*@
                    if (Html.LoadModulePowers(@Model, "Order_add"))
                    {
                    <li><a href="/Order/Order/OrderAdd/">
                        <img src="~/Themes/default/home/images/order_01.png"><span>新增订单</span></a></li>
                    }
                    if (Html.LoadModulePowers(@Model, "Order"))
                    {
                    <li><a href="/Home/Main/Order/">
                        <img src="~/Themes/default/home/images/home_btn_05.png"><span>订单管理</span></a></li>
                    }
                    if (Html.LoadModulePowers(@Model, "Yuangong"))
                    {
                    <li><a href="/Home/Main/Yuangong/">
                        <img src="~/Themes/default/home/images/home_btn_07.png"><span>员工管理</span></a></li>
                    }
                    if (Html.LoadModulePowers(@Model, "Finance"))
                    {
                    <li><a href="/Home/Main/Finance/">
                        <img src="~/Themes/default/home/images/home_btn_09.png"><span>财务信息</span></a></li>
                    }
                    if (Html.LoadModulePowers(@Model, "Settings"))
                    {
                    <li><a href="/Home/Main/Seting/">
                        <img src="~/Themes/default/home/images/home_btn_11.png"><span>系统设置</span></a></li>
                    }
                }
                @if ((@Session[EdKeys.SESSION_ROLE_NAME]).ToString() == "地区管理员")
                {
                    if (Html.LoadModulePowers(@Model, "Order_add"))
                    {
                    <li><a href="/Order/Order/OrderAdd/">
                        <img src="~/Themes/default/home/images/order_01.png"><span>新增订单</span></a></li>
                    }
                    if (Html.LoadModulePowers(@Model, "Order"))
                    {
                    <li><a href="/Home/Main/Order/">
                        <img src="~/Themes/default/home/images/home_btn_05.png"><span>订单管理</span></a></li>
                    }
                    if (Html.LoadModulePowers(@Model, "Yuangong"))
                    {
                    <li><a href="/Home/Main/Yuangong/">
                        <img src="~/Themes/default/home/images/home_btn_07.png"><span>员工管理</span></a></li>
                    }
                    if (Html.LoadModulePowers(@Model, "Settings"))
                    {
                    <li><a href="/Home/Main/Seting/">
                        <img src="~/Themes/default/home/images/home_btn_11.png"><span>系统设置</span></a></li>
                    }
                }
                <div style="clear: both;">
                </div>
            </ul>
        </div>
    </div>
    <!--主页主题部分 结束-->
</body>
</html>
